package com.example.aircraft.database;

public class Rank_Data implements Comparable<Rank_Data> {
    private int ID;
    private int SCORE;
    private String USER_NAME;
    private String TIME;
    private String level;

    public Rank_Data(int ID,String USER_NAME, int SCORE,String TIME, int level){
        this.ID = ID;
        this.USER_NAME = USER_NAME;
        this.TIME = TIME;
        this.SCORE = SCORE;
        switch(level){
            case 1:
                this.level = "EASY";
                break;
            case 2:
                this.level = "NORMAL";
                break;
            case 3:
                this.level = "HARD";
                break;
        }
    }


    public String getLevel(){
        return this.level;
    }
    public int getID(){
        return this.ID;
    }
    public  int getSCORE(){
        return this.SCORE;
    }
    public String getUSER_NAME(){
        return this.USER_NAME;
    }
    public String getTIME(){
        return this.TIME;
    }
    public String toScore(){
        return this.SCORE + " ";
    }
    public String toLevel(){
        return this.level;
    }

    @Override
    public int compareTo(Rank_Data rank_data) {
        return Integer.compare(rank_data.SCORE, this.SCORE);
    }

}
